FROM node:20
ADD ./entrypoint.sh /root/entrypoint.sh

RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
RUN yarn config set npmRegistryServer  https://registry.npmmirror.com
RUN yarn global add pm2 hydrooj @hydrooj/ui-default

RUN chmod +x /root/entrypoint.sh && \
    mkdir -p /root/.hydro


ENTRYPOINT /root/entrypoint.sh
